package com.ruoyi.backend.mapper;

import com.ruoyi.backend.dto.RestorationDataUploadDTO;
import com.ruoyi.backend.pojo.RestorationData;
import com.ruoyi.backend.vo.RestorationDataVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface RestorationDataMapper {

    void upload(RestorationDataUploadDTO restorationDataUploadDTO);

    void delete(Integer id);

    void update(RestorationData restorationData);

    List<RestorationDataVO> search(@Param("restorationId") Integer restorationId,
                                   @Param("reportType") String reportType,
                                   @Param("startTime") LocalDate startTime,
                                   @Param("endTime") LocalDate endTime,
                                   @Param("fileType") String fileType);

    List<RestorationDataVO> searchAll();

    Integer getRestorationCount(Integer id);

    RestorationData findById(Integer id);
}
